/**
 * 申请社团的总信息
 * init 为真表示等待初始化中 即数据还未获取到或者正在获取数据
 */
import {IUserRsp} from "@/lib/recover";

export interface IApplyClubsManage{
    apply_clubs:IApplyClubs[],
    page:number,
    init:boolean,
    lastPagination:IPagination<IApplyClubs>|null
}
/**
 * 申请社团的单条信息
 */
export interface IApplyClubs{
    clubname:string,
    status:string,
    id:number,
}
/**
 * 请求分页的结果
 */
export interface IPagination<T> {
    items:T[]//储存的数组
    page_info:{
        has_next_page:boolean,//是否有下一页
        has_prev_page:boolean,//是否有上一页
        current_page:number,
        current_size:number
    },
    total_count:number//总数
}
/**
 * 请求分页数据所使用
 */
export interface IPaginationReq {
    page:number,//页数
    size:number,//数量
}
/**
 * 我的页面数据
 */
export interface IUser{
    nickname: String,
    avatar: String,
    gender: Number,
    // 如果inint为真 则表明该对象没有被初始化
    init:number,
    actor:Number,
}

export interface ICLubInfo{
    introduction:string,
    name:string,
    address:string,
    body:string
}

/**
 * 社团列表单条信息
 */
export interface IClub {
    name:string,
    avatar:string,
    desc:string
    id:number,
    content:string,
}

/**
 * 社团列表管理信息
 */
export interface IClubManage{
    clubs:IClub[]|null,
    init:boolean,
}
/**
 * 角色类
 */
export interface IActors{
    association_leader:Number,
    admin:Number,
    student:Number,
}

export enum SingletonState{
    sleep=0,
    doing=1,
    done=2,
    notlogin=3,
    logined=4,
}
/**
 * 单列使用状态
 */
export interface ISingleton{
    applyClubsManageState:number,
    applyUserInfo:number,
}
/**
 * store 类型列表
 */
export interface IMobileStore {
    user:{
        user:IUser,
        user_info:IUserRsp
    },
    debug:boolean,
    club_manage:IClubManage,
    page:number,
    actors:IActors
    applys:IApplyClubsManage,
    singleton:ISingleton,
}


export interface iListNode{
    title:string,
    description:string,
    notify_id:number,
    apply_id:number,
    form_id:number,
    content:string,
    mark_read:boolean,
}